In recent years, along with miniaturization and increasing capacity of NAND type flash memory, a margin between threshold distributions of a memory cell has narrowed. Furthermore, repeating an erase operation (Erase) and a write operation (Program) on a memory cell holding ordinary data causes a threshold voltage distribution of that memory cell to deviate from an initial state, with the result that read by an optimal setting of a read voltage becomes difficult. In contrast, the erase operation and the write operation are never repeatedly executed on a memory cell holding initial setting data. However, the erase operation and the write operation on the memory cell holding ordinary data have an effect also on the threshold voltage of the memory cell holding initial setting data. As a result, read by an optimal setting of a read voltage becomes difficult also for the memory cell holding initial setting data.